<template>
  <el-descriptions
      :column="1"
      border>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-edit"></i>
        测试名称
      </template>
      <span class="item-text">
            {{ report.taskname }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-setting"></i>
        测试类型
      </template>
      <span class="item-text">
            {{ report.type }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-user"></i>
        测试人员
      </template>
      <span class="item-text">
            {{ report.workername }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-map-location"></i>
        测试环境
      </template>
      <span class="item-text">
            {{ report.environment }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-alarm-clock"></i>
        提交时间
      </template>
      <span class="item-text">
            {{ report.submittime }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-document"></i>
        缺陷描述
      </template>
      <span class="item-text">
            {{ report.description }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-coin"></i>
        复现步骤
      </template>
      <span class="item-text">
            {{ report.steps }}
          </span>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-picture-outline"></i>
        缺陷截图
      </template>
      <a class="item-text">
        <!--            {{ report.screenshot }}-->
        <el-image
            class="my-img"
            ref="myImg"
            :src=report.screenshot>
        </el-image>
        <el-link :href="report.screenshot" target="_blank"><el-tag type="success" effect="dark">点此下载截图</el-tag></el-link>
      </a>
    </el-descriptions-item>
  </el-descriptions>
</template>

<script>
export default {
  name: "ReportDetailTable",
  props: {
    report: {
      default() {
        return {};
      }
    }
  }
}
</script>

<style scoped>
.item-text {
  color: #5e5e5e;
}
</style>
